# 计算数字范围内所有的偶数

# 自己写的
def is_double(a):
    if a % 2 == 0:
        return True
    else:
        return False


def sum_of_double(begin, final):
    double_list = []
    for i in range(begin, final + 1):
        if is_double(i):
            double_list.append(i)
        else:
            continue
    return double_list


begin = int(input("请输入起始数字："))
final = int(input("请输入末尾数字："))
print(sum_of_double(begin, final))


# 网站上的
def get_even_numbers(begin, final):
    result = []
    for i in range(begin, final + 1):
        if i % 2 == 0:
            result.append(i)
        else:
            continue
    return result


print(get_even_numbers(begin, final))
